package com.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.demo.domain.Domain;

@RestController
public class DomainController {

	@Autowired
	private Domain domain;
	@Value("${auto-accept-city-switch}")
	private String cmsDomain;
	@Value("${big.good.floor.fee.ration:xxx}")
	private String ration;

	@GetMapping("/sen")
    public String sen() throws Exception{
		System.out.println(ration);
		Config config = ConfigService.getAppConfig();
		String result = config.getProperty("domain.url", "");

		return domain.getUrl();
	}

}
